using System;
using System.Data;

namespace SistemaLib.sipe.db.general
{
	/// <summary>
	/// Summary description for DbConnectionBase.
	/// </summary>
	public interface IDbConnectionBase
	{
		
		void Open();
	
		void Close();

		void Dispose();

		void BeginTransaction();

		void CommitTransaction();

		void RollbackTransaction();
		
		bool RunDataSetProcedure(string procedure,out DataSet dataSet);

		bool RunDataSetProcedure(string procedure,CommandType commandType,out DataSet dataSet);

		bool RunDataSetProcedure(string procedure,DbParameterCollection parameters,out DataSet dataSet);

		bool RunNonQueryProcedure(string procedure,CommandType commandType,out int recordsAffected);
				
		bool RunNonQueryProcedure(string procedure,DbParameterCollection parameters,out int recordsAffected);

		bool RunNonQueryProcedure(string procedure,out int recordsAffected);

		bool RunScalarProcedure(string procedure,out object value);

		bool RunScalarProcedure(string procedure,CommandType commandType,out object value);

		bool RunScalarProcedure(string procedure,DbParameterCollection parameters,out object value);

	}
}
